import { GLItem } from './GLItem'
import { GLFolderLike } from './GLFolderLike'

export class GLBookChapter extends GLItem {
  public content: string;
  public footnotes: string;

  constructor(data, parentFolder?: GLFolderLike) {
    super(parentFolder, data.title, data.uri);
    this.content = data.content;
    this.footnotes = data.refs;
  }

  getContent(footnotes: boolean) {
    return footnotes ? this.footnotes : this.content;
  }
}
